home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19980424-19980901
/
000284_news@newsmaster….columbia.edu _Thu Jul 16 12:33:57 1998.msg
< prev
next >
Wrap
Internet Message Format
|
1998-08-31
|
4KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA25626
for <kermit.misc@watsun.cc.columbia.edu>; Thu, 16 Jul 1998 12:33:56 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id MAA18726
for kermit.misc@watsun; Thu, 16 Jul 1998 12:33:56 -0400 (EDT)
Path: news.columbia.edu!sol.ctr.columbia.edu!paralynx!news.mindlink.net!paralynx-2!paralynx!paralynx-4!van-bc!nntp.portal.ca!nntp.cs.ubc.ca!news.Stanford.EDU!su-news-feed2.bbnplanet.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.wli.net!news.he.net!Supernews60!supernews.com!peerfeed.ncal.verio.net!bug.rahul.net!samba.rahul.net!rahul.net!a2i!dold.a2i!dold
From: dold@88.usenet.us.com
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Key Mapping
Date: 16 Jul 1998 16:30:26 GMT
Organization: a2i network
Lines: 54
Message-ID: <6ol9r2$2nf$1@samba.rahul.net>
References: <6okifb$ijr$1@nclient1-gui.server.virgin.net>
Reply-To: dold@network.rahul.net
NNTP-Posting-Host: waltz.rahul.net
NNTP-Posting-User: dold
X-Newsreader: TIN [version 1.2 PL2]
X-Comment: Encoded From: line allows replies that preserve original subject
Xref: news.columbia.edu comp.protocols.kermit.misc:8986
Fergus Strachan (fergus.strachan@virgin.net) wrote:
: Small problem with my arrow keys...
: Got direct serial connection to a UNIX box using VT320/220 and everything's
: almost fine, except some of the keys...
: I tried the standard key 'numbers' at the back of the book to map to the
: \KUpArr etc. but to no avail - when I use the arrow keys it asks me if I
: want to exit the unix program I'm running.
That is an indication that the program is seeing the ESC character at the
start of the string, and recognizing it as an escape, without waiting to
see if the next character is part of a control sequence.
I went through some major rewrite of the curses library for SVR3 in this
area when I was in kernel support. Most Unix boxes have a hard time with
the timing, especially if any buffering is involved, like TCP, or
high-speed modems, or even buffered UARTs in the host box, that might
"split" packets between the ESC and the [
This is aside from the clues that Frank gives in another reply, but it
could be that your Unix box is the problem. Does it happen at different
baud rates? I vaguely recall that there were some speed-based parameters
in the code.
Go to a Unix shell prompt.
od -c <ENTER>
<RIGHT ARROW> <ENTER>
ctrl-d
0000000 033 [ C \r
In my case, this indicates that a right arrow is producing an ESC, followed
by a left bracket and C.
infocmp (some lines deleted)
AT386|at386|386AT|386at|at/386 console,
kclr=\E[2J, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
kcuu1=\E[A, kdch1=\E[P, kend=\E[Y, kf1=\EOP,
infocmp tells me what Unix is expecting from my terminal, which is defined
as an AT386. \E[C is for "key-cursor-forward-mode1", you can see A,B,C,D
described as up,down,forward,back.
So my arrow keys match what Unix expects. If this wasn't true, there would
be work to do. If it is true, and the keys don't work, especially if they
work intermittently, the curses library is probably at fault.
Function keys have the same problem, a sequence starting with an ESC, which
is used by a lot of programs for escaping from a particular screen.
In the short sample above, kf1 is function key 1.
--
---
Clarence A Dold - dold@network.rahul.net
- Pope Valley & Napa CA.